// let a =1
// let b ='2'
// let c = true
// let d = undefined
// let e = null
// let f = Symbol(1)
// let g= 123123123n

// console.log(typeof (e));

let arr = []
console.log(arr instanceof Array );

function myInstanceof(l,f){
    let lProto = l._proto
    let rProto = r.prototype
    while(lProto){
        if(lProto === rProto) {
            return true
        }else{
            lProto = lProto.__proto__
        }
    }
    return false
    
}

console.log(Object.prototype.toString.call('asd'));

Function.prototype.myCall = function(context){
    context.foo = this//fn
    context.foo()
    delete context.foo
}

let obj = {
    name: 'obj'
}

let fn = function(){
    console.log(this.name)
}

fn.myCall(obj)


